<?php
/**
 * @package WordPress
 * @subpackage Bside
 */
?>
    <div id="sidebar">
        <!-- top sidebar {{{-->
        <div class="sidebar-top">
            <!--//asidestory{{{
            <div class="aside-story">
                <h2>Little Story</h2>
                <ul>
                <?php $littlestory = get_posts('numberposts=3&category=24');foreach($littlestory as $post) : setup_postdata($post); ?>
                <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo $post->post_excerpt; ?></a></li>
                <?php endforeach; ?>
                </ul>
            </div>
            //}}}-->
            <ul>
                <?php wp_list_bookmarks('class=level-1&category=750'); ?>
                <li><a href="http://feeds2.feedburner.com/qianli/8code" title="订阅feedburner烧制的种子"><img src="http://feeds2.feedburner.com/~fc/qianli/8code?bg=FFFFFF&amp;fg=990000&amp;anim=0" height="26" width="88" style="border:0" alt="" /></a>
                <!-- Feedsky FEED 订阅统计发布代码开始 -->
                <a href="http://feed.feedsky.com/championeer" title="订阅feedsky烧制的种子" target="_blank"><img src="http://www.feedsky.com/feed/championeer/sc/gif" style="border:0" alt="" /></a></li>
<!-- Feedsky FEED 订阅统计发布代码结束 -->
            </ul>
        </div>
        <!-- end of top sidebar }}}-->
        <!-- left sidebar {{{-->
        <div class="sidebar-left">
            <ul>
                <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-left') ) : ?>
                <?php if(is_page('archives')) : ?>
                    <li class="level-1">
                        <h2>热门关键词</h2><br/>
                        <?php wp_tag_cloud('smallest=0.9&largest=1.6&unit=em&number=30'); ?>
                    </li>
                <?php endif; ?>
                <?php if(is_single()) { ?>
                    <li class="level-1">
                        <h2>相关文章</h2>
                        <?php if(function_exists('wp_related_posts')) wp_related_posts(); ?>
                    </li>
                    <li class="level-1">
                        <h2>最新文章</h2>
                        <ul><?php wp_get_archives('type=postbypost&limit=15'); ?></ul> 
                    </li>
                <?php } ?>
                
                <?php if (function_exists('get_most_viewed') && is_home()): ?>
                    <li class="level-1">
                        <h2>热文排行</h2>
                        <ul><?php get_most_viewed('post', 15); ?></ul>
                <?php endif; ?>
                <li class="level-1">
                    <h2>最新评论</h2>
                    <ul><?php if(function_exists('wkc_recent_comments')) wkc_recent_comments('number=15&length=15'); ?></ul>
                </li>

                <?php endif; ?>
            </ul>
        </div>
    <!-- end of left sidebar }}}-->
    <!-- right sidebar {{{-->
        <div class="sidebar-right">
            <ul>
                <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-right') ) : ?>
                <?php endif; ?>
            </ul>
        </div>
        <div class="sidebar-bottom">
            <ul>
                <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
                    <?php wp_list_bookmarks('title_li=友情链接&class=level-1&category_name=blogroll'); ?>
                <?php } ?>
                <?php if(is_home()) : ?>
                <li class="level-1">
                    <h2>Google Friend Connect</h2>
                    <div style="padding-left: 10px; margin-top: 10px;">
                    <!-- Include the Google Friend Connect javascript library. -->
                    <script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
                    <!-- Define the div tag where the gadget will be inserted. -->
                    <div id="div-1234342085929" style="width:250px;border:1px solid #c0c0c0;"></div>
                    <!-- Render the gadget into a div. -->
                    <script type="text/javascript">
                    var skin = {};
                    skin['HEIGHT'] = '385';
                    skin['BORDER_COLOR'] = '#c0c0c0';
                    skin['ENDCAP_BG_COLOR'] = '#ffffff';
                    skin['ENDCAP_TEXT_COLOR'] = '#333333';
                    skin['ENDCAP_LINK_COLOR'] = '#cc0000';
                    skin['ALTERNATE_BG_COLOR'] = '#ffffff';
                    skin['CONTENT_BG_COLOR'] = '#ffffff';
                    skin['CONTENT_LINK_COLOR'] = '#000000';
                    skin['CONTENT_TEXT_COLOR'] = '#333333';
                    skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
                    skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
                    skin['CONTENT_HEADLINE_COLOR'] = '#333333';
                    google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
                    google.friendconnect.container.renderMembersGadget(
                     { id: 'div-1234342085929',
                       site: '14574299978941407700' },
                      skin);
                    </script>
                    </div>
                </li>
                <?php endif; ?>
            </ul>

        </div>
    <!-- end of right sidebar }}}-->
	</div>

